﻿
namespace Sai.Core.Introspection
{

    public class StaticConstructorDeclaration : TypeMember, ISourceCodeProvider
    {
		public StaticConstructorDeclaration(TypeName typeName)
			: base(typeName)
		{
		}

		public StaticConstructorDeclaration(TypeName typeName, ObsoleteMarker obsolete)
			: base(typeName, obsolete)
		{
		}

		public override string ToString()
		{
			return string.Format(
				"static {0}()", 
				this.TypeName.Name);
		}


        public SourceCode ToCode()
        {
            SourceCode code = new SourceCode();

            code.Add(new KeywordTag("static"));
            code.Add(this.TypeName.ToCode());
            code.Add(new PunctuationTag("("));
            code.Add(new PunctuationTag(")"));

            return code;
        }
    }
}
